<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SPHinXsys: SPH::BaseParticles Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SPHinXsys
   &#160;<span id="projectnumber">alpha version</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespace_s_p_h.html">SPH</a></li><li class="navelem"><a class="el" href="class_s_p_h_1_1_base_particles.html">BaseParticles</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_s_p_h_1_1_base_particles-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">SPH::BaseParticles Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Particles with essential (geometric and kinematic) data. There are three types of particles， all particles of a same type are saved with continuous memory segments. The first type is real particles whose states are updated by particle dynamics. One is buffer particles whose state are not updated by particle dynamics. Buffer particles are saved behind real particles. The global value of total_real_particles_ separate the real and buffer particles. They may be switched from real particles or switch to real particles. As the memory for both particles are continuous, such switch is achieved at the memory boundary sequentially. The basic idea is swap the data of the last real particle with the one will be switched particle, and then switch this swapped last particle as buffer particle by decrease the total_real_particles_ by one. Switch from buffer particle to real particle is easy. One just need to assign expect state to the first buffer particle and increase total_real_particles_ by one. The other is ghost particles whose states are updated according to boundary condition if their indices are included in the neighbor particle list. The ghost particles are saved behind the buffer particles. The global value of real_particles_bound_ separate the sum of real and buffer particles with ghost particles. The global value of total_ghost_particles_ indicates the total number of ghost particles in use. It will be initialized to zero before a time step.  
 <a href="class_s_p_h_1_1_base_particles.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="base__particles_8h_source.html">base_particles.h</a>&gt;</code></p>

<p>Inherited by <a class="el" href="class_s_p_h_1_1_fluid_particles.html">SPH::FluidParticles</a>, and <a class="el" href="class_s_p_h_1_1_solid_particles.html">SPH::SolidParticles</a>.</p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_p_h_1_1_base_particles_1_1add_a_particle_data_value.html">addAParticleDataValue</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_p_h_1_1_base_particles_1_1loop_variabale_name_list.html">loopVariabaleNameList</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a4ceaaa29fb12228b3ab883444f17c028"><td class="memItemLeft" align="right" valign="top"><a id="a4ceaaa29fb12228b3ab883444f17c028"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>BaseParticles</b> (<a class="el" href="class_s_p_h_1_1_s_p_h_body.html">SPHBody</a> *body, <a class="el" href="class_s_p_h_1_1_base_material.html">BaseMaterial</a> *base_material)</td></tr>
<tr class="separator:a4ceaaa29fb12228b3ab883444f17c028"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2da99c389016be0faf7bec43dd638e8"><td class="memItemLeft" align="right" valign="top"><a id="ae2da99c389016be0faf7bec43dd638e8"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>BaseParticles</b> (<a class="el" href="class_s_p_h_1_1_s_p_h_body.html">SPHBody</a> *body)</td></tr>
<tr class="separator:ae2da99c389016be0faf7bec43dd638e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7eda51aeb6fc94339f9d28575a0df063"><td class="memTemplParams" colspan="2">template&lt;int DataTypeIndex, typename VariableType &gt; </td></tr>
<tr class="memitem:a7eda51aeb6fc94339f9d28575a0df063"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#a7eda51aeb6fc94339f9d28575a0df063">registerAVariable</a> (StdLargeVec&lt; <a class="el" href="class_variable_type.html">VariableType</a> &gt; &amp;variable_addrs, std::string variable_name, <a class="el" href="class_variable_type.html">VariableType</a> initial_value=<a class="el" href="class_variable_type.html">VariableType</a>(0))</td></tr>
<tr class="separator:a7eda51aeb6fc94339f9d28575a0df063"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9a9d99734c972e6cf1e4d9689545487"><td class="memTemplParams" colspan="2">template&lt;int DataTypeIndex, typename VariableType &gt; </td></tr>
<tr class="memitem:ae9a9d99734c972e6cf1e4d9689545487"><td class="memTemplItemLeft" align="right" valign="top">StdLargeVec&lt; <a class="el" href="class_variable_type.html">VariableType</a> &gt; *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#ae9a9d99734c972e6cf1e4d9689545487">createAVariable</a> (std::string new_variable_name, <a class="el" href="class_variable_type.html">VariableType</a> initial_value=<a class="el" href="class_variable_type.html">VariableType</a>(0))</td></tr>
<tr class="separator:ae9a9d99734c972e6cf1e4d9689545487"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a603b1f4b21d060ef0a036e341578bbe1"><td class="memTemplParams" colspan="2">template&lt;int DataTypeIndex, typename VariableType &gt; </td></tr>
<tr class="memitem:a603b1f4b21d060ef0a036e341578bbe1"><td class="memTemplItemLeft" align="right" valign="top">StdLargeVec&lt; <a class="el" href="class_variable_type.html">VariableType</a> &gt; *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#a603b1f4b21d060ef0a036e341578bbe1">createAVariable</a> (std::string new_variable_name, std::string old_variable_name)</td></tr>
<tr class="separator:a603b1f4b21d060ef0a036e341578bbe1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6dc2dba5a7b84f2e814fba642ea8cba0"><td class="memTemplParams" colspan="2">template&lt;int DataTypeIndex, typename VariableType &gt; </td></tr>
<tr class="memitem:a6dc2dba5a7b84f2e814fba642ea8cba0"><td class="memTemplItemLeft" align="right" valign="top">StdLargeVec&lt; <a class="el" href="class_variable_type.html">VariableType</a> &gt; *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#a6dc2dba5a7b84f2e814fba642ea8cba0">getVariableByName</a> (std::string variable_name)</td></tr>
<tr class="separator:a6dc2dba5a7b84f2e814fba642ea8cba0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0bfbad4c717e63466ba19c25e2f0d921"><td class="memTemplParams" colspan="2">template&lt;int DataTypeIndex, typename VariableType &gt; </td></tr>
<tr class="memitem:a0bfbad4c717e63466ba19c25e2f0d921"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#a0bfbad4c717e63466ba19c25e2f0d921">addAVariableToWrite</a> (std::string variable_name)</td></tr>
<tr class="separator:a0bfbad4c717e63466ba19c25e2f0d921"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e3222c982fea6397f428581109f3eab"><td class="memTemplParams" colspan="2">template&lt;int DataTypeIndex, typename VariableType &gt; </td></tr>
<tr class="memitem:a2e3222c982fea6397f428581109f3eab"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#a2e3222c982fea6397f428581109f3eab">registerASortableVariable</a> (std::string variable_name)</td></tr>
<tr class="separator:a2e3222c982fea6397f428581109f3eab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e1459f06c7b5bb9886ed642984a5c22"><td class="memItemLeft" align="right" valign="top"><a id="a3e1459f06c7b5bb9886ed642984a5c22"></a>
<a class="el" href="class_s_p_h_1_1_s_p_h_body.html">SPHBody</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>getSPHBody</b> ()</td></tr>
<tr class="separator:a3e1459f06c7b5bb9886ed642984a5c22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27f6cbf386ec96c5b85cb214db9705af"><td class="memItemLeft" align="right" valign="top"><a id="a27f6cbf386ec96c5b85cb214db9705af"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>initializeABaseParticle</b> (Vecd pnt, Real Vol_0)</td></tr>
<tr class="separator:a27f6cbf386ec96c5b85cb214db9705af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a503fbe475524e8544ece23013515d7f6"><td class="memItemLeft" align="right" valign="top"><a id="a503fbe475524e8544ece23013515d7f6"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>addABufferParticle</b> ()</td></tr>
<tr class="separator:a503fbe475524e8544ece23013515d7f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88f56a5392d851bf25ea7fa9cf09842a"><td class="memItemLeft" align="right" valign="top"><a id="a88f56a5392d851bf25ea7fa9cf09842a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>copyFromAnotherParticle</b> (<a class="el" href="classsize__t.html">size_t</a> this_index, <a class="el" href="classsize__t.html">size_t</a> another_index)</td></tr>
<tr class="separator:a88f56a5392d851bf25ea7fa9cf09842a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afbf782f2e698af1e91cb6570a4c43184"><td class="memItemLeft" align="right" valign="top"><a id="afbf782f2e698af1e91cb6570a4c43184"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>updateFromAnotherParticle</b> (<a class="el" href="classsize__t.html">size_t</a> this_index, <a class="el" href="classsize__t.html">size_t</a> another_index)</td></tr>
<tr class="separator:afbf782f2e698af1e91cb6570a4c43184"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a07ff11234c5ec58ff67bbc4251f489"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsize__t.html">size_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#a7a07ff11234c5ec58ff67bbc4251f489">insertAGhostParticle</a> (<a class="el" href="classsize__t.html">size_t</a> index_i)</td></tr>
<tr class="separator:a7a07ff11234c5ec58ff67bbc4251f489"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a639f415a5b9f3e0fcd662f2309a95a80"><td class="memItemLeft" align="right" valign="top"><a id="a639f415a5b9f3e0fcd662f2309a95a80"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>switchToBufferParticle</b> (<a class="el" href="classsize__t.html">size_t</a> index_i)</td></tr>
<tr class="separator:a639f415a5b9f3e0fcd662f2309a95a80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b77e1d04a5955cee741defc108c1b75"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#a2b77e1d04a5955cee741defc108c1b75">writeParticlesToVtuFile</a> (std::ofstream &amp;output_file)</td></tr>
<tr class="separator:a2b77e1d04a5955cee741defc108c1b75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af56c3d9d2de8bcd3811c77689101a352"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#af56c3d9d2de8bcd3811c77689101a352">writeParticlesToPltFile</a> (std::ofstream &amp;output_file)</td></tr>
<tr class="separator:af56c3d9d2de8bcd3811c77689101a352"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaeeaf1adde26dc62650dc77f63907975"><td class="memItemLeft" align="right" valign="top"><a id="aaeeaf1adde26dc62650dc77f63907975"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>writeParticlesToXmlForRestart</b> (std::string &amp;filefullpath)</td></tr>
<tr class="separator:aaeeaf1adde26dc62650dc77f63907975"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa37ad6e9dc1d1362a55bc056e75600b6"><td class="memItemLeft" align="right" valign="top"><a id="aa37ad6e9dc1d1362a55bc056e75600b6"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>readParticleFromXmlForRestart</b> (std::string &amp;filefullpath)</td></tr>
<tr class="separator:aa37ad6e9dc1d1362a55bc056e75600b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeae361a6b2046bee2abd4c25c7366846"><td class="memItemLeft" align="right" valign="top"><a id="aeae361a6b2046bee2abd4c25c7366846"></a>
<a class="el" href="class_s_p_h_1_1_xml_engine.html">XmlEngine</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>getReloadXmlEngine</b> ()</td></tr>
<tr class="separator:aeae361a6b2046bee2abd4c25c7366846"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5432ee0e4a327e2025b6462ed0b715f8"><td class="memItemLeft" align="right" valign="top"><a id="a5432ee0e4a327e2025b6462ed0b715f8"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>writeToXmlForReloadParticle</b> (std::string &amp;filefullpath)</td></tr>
<tr class="separator:a5432ee0e4a327e2025b6462ed0b715f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3234b920653432073f4feecc10f09409"><td class="memItemLeft" align="right" valign="top"><a id="a3234b920653432073f4feecc10f09409"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>readFromXmlForReloadParticle</b> (std::string &amp;filefullpath)</td></tr>
<tr class="separator:a3234b920653432073f4feecc10f09409"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad41324c9d1f3687df6134624756eb953"><td class="memItemLeft" align="right" valign="top"><a id="ad41324c9d1f3687df6134624756eb953"></a>
virtual <a class="el" href="class_s_p_h_1_1_base_particles.html">BaseParticles</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>ThisObjectPtr</b> ()</td></tr>
<tr class="separator:ad41324c9d1f3687df6134624756eb953"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aacd901a6230deb7dfb2b6e5ca192072c"><td class="memItemLeft" align="right" valign="top">virtual Vecd&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#aacd901a6230deb7dfb2b6e5ca192072c">normalizeKernelGradient</a> (<a class="el" href="classsize__t.html">size_t</a> particle_index_i, Vecd &amp;kernel_gradient)</td></tr>
<tr class="separator:aacd901a6230deb7dfb2b6e5ca192072c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:affce1d43813839bdc86d091ff8c77e2d"><td class="memItemLeft" align="right" valign="top">virtual Vecd&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#affce1d43813839bdc86d091ff8c77e2d">getKernelGradient</a> (<a class="el" href="classsize__t.html">size_t</a> particle_index_i, <a class="el" href="classsize__t.html">size_t</a> particle_index_j, Real dW_ij, Vecd &amp;e_ij)</td></tr>
<tr class="separator:affce1d43813839bdc86d091ff8c77e2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a6b6da33563d4725affb544d20848ea58"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_s_p_h_1_1_base_material.html">BaseMaterial</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#a6b6da33563d4725affb544d20848ea58">base_material_</a></td></tr>
<tr class="separator:a6b6da33563d4725affb544d20848ea58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad56cde78e1cf8ca57bae114d88a23c3c"><td class="memItemLeft" align="right" valign="top">StdLargeVec&lt; Vecd &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#ad56cde78e1cf8ca57bae114d88a23c3c">pos_n_</a></td></tr>
<tr class="separator:ad56cde78e1cf8ca57bae114d88a23c3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf142120d4165071c15dc4974f1f8df7"><td class="memItemLeft" align="right" valign="top">StdLargeVec&lt; Vecd &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#adf142120d4165071c15dc4974f1f8df7">vel_n_</a></td></tr>
<tr class="separator:adf142120d4165071c15dc4974f1f8df7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a009d3448cf7a69fb162ede6afd34f5ee"><td class="memItemLeft" align="right" valign="top">StdLargeVec&lt; Vecd &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#a009d3448cf7a69fb162ede6afd34f5ee">dvel_dt_</a></td></tr>
<tr class="separator:a009d3448cf7a69fb162ede6afd34f5ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6aa918af115e49d6b98137c00b015e7"><td class="memItemLeft" align="right" valign="top">StdLargeVec&lt; Vecd &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#aa6aa918af115e49d6b98137c00b015e7">dvel_dt_others_</a></td></tr>
<tr class="separator:aa6aa918af115e49d6b98137c00b015e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeff9ca6449d936cf70a2ace2fb9d92d2"><td class="memItemLeft" align="right" valign="top">StdLargeVec&lt; Real &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#aeff9ca6449d936cf70a2ace2fb9d92d2">Vol_</a></td></tr>
<tr class="separator:aeff9ca6449d936cf70a2ace2fb9d92d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06420b0b549bd31847cc56cf86830091"><td class="memItemLeft" align="right" valign="top">StdLargeVec&lt; Real &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#a06420b0b549bd31847cc56cf86830091">rho_n_</a></td></tr>
<tr class="separator:a06420b0b549bd31847cc56cf86830091"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02c7fc3468dcf92154a1a60c2a170e1a"><td class="memItemLeft" align="right" valign="top">StdLargeVec&lt; Real &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#a02c7fc3468dcf92154a1a60c2a170e1a">mass_</a></td></tr>
<tr class="separator:a02c7fc3468dcf92154a1a60c2a170e1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e3eca63a9bb993caec5396ce5f48be9"><td class="memItemLeft" align="right" valign="top">Real&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#a2e3eca63a9bb993caec5396ce5f48be9">rho_0_</a></td></tr>
<tr class="separator:a2e3eca63a9bb993caec5396ce5f48be9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e91adfca7218a340b59f6f1089d54d4"><td class="memItemLeft" align="right" valign="top">Real&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#a6e91adfca7218a340b59f6f1089d54d4">sigma_0_</a></td></tr>
<tr class="separator:a6e91adfca7218a340b59f6f1089d54d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5c08c3a1026bfd96469e902ebb9e934"><td class="memItemLeft" align="right" valign="top">Real&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#ac5c08c3a1026bfd96469e902ebb9e934">speed_max_</a></td></tr>
<tr class="separator:ac5c08c3a1026bfd96469e902ebb9e934"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab8225845e6682236f4c7b11c162f76f3"><td class="memItemLeft" align="right" valign="top">Real&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#ab8225845e6682236f4c7b11c162f76f3">signal_speed_max_</a></td></tr>
<tr class="separator:ab8225845e6682236f4c7b11c162f76f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b4225bb534166d2fff443276cbaee23"><td class="memItemLeft" align="right" valign="top"><a id="a9b4225bb534166d2fff443276cbaee23"></a>
<a class="el" href="classsize__t.html">size_t</a>&#160;</td><td class="memItemRight" valign="bottom"><b>total_real_particles_</b></td></tr>
<tr class="separator:a9b4225bb534166d2fff443276cbaee23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0501a7ad45113b5e671704ed6537c0fb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsize__t.html">size_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#a0501a7ad45113b5e671704ed6537c0fb">real_particles_bound_</a></td></tr>
<tr class="separator:a0501a7ad45113b5e671704ed6537c0fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9605682a266238420c90af7123dc3746"><td class="memItemLeft" align="right" valign="top"><a id="a9605682a266238420c90af7123dc3746"></a>
<a class="el" href="classsize__t.html">size_t</a>&#160;</td><td class="memItemRight" valign="bottom"><b>total_ghost_particles_</b></td></tr>
<tr class="separator:a9605682a266238420c90af7123dc3746"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ff104e070c2a8eab7eb508c0e771e16"><td class="memItemLeft" align="right" valign="top"><a id="a5ff104e070c2a8eab7eb508c0e771e16"></a>
<a class="el" href="namespace_s_p_h.html#a25348a626f1536e232c52f9717945f59">ParticleData</a>&#160;</td><td class="memItemRight" valign="bottom"><b>all_particle_data_</b></td></tr>
<tr class="separator:a5ff104e070c2a8eab7eb508c0e771e16"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a223559c22f21f69c05bd630421848111"><td class="memItemLeft" align="right" valign="top"><a id="a223559c22f21f69c05bd630421848111"></a>
<a class="el" href="namespace_s_p_h.html#ad964bd16bd649c1ee72aa32164405435">ParticleDataMap</a>&#160;</td><td class="memItemRight" valign="bottom"><b>all_variable_maps_</b></td></tr>
<tr class="separator:a223559c22f21f69c05bd630421848111"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9791271d7da2a1266a2853b6158b2b14"><td class="memItemLeft" align="right" valign="top"><a id="a9791271d7da2a1266a2853b6158b2b14"></a>
StdLargeVec&lt; <a class="el" href="classsize__t.html">size_t</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>sequence_</b></td></tr>
<tr class="separator:a9791271d7da2a1266a2853b6158b2b14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73e49d0ece770a2640cee40cf7642a6b"><td class="memItemLeft" align="right" valign="top"><a id="a73e49d0ece770a2640cee40cf7642a6b"></a>
StdLargeVec&lt; <a class="el" href="classsize__t.html">size_t</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>sorted_id_</b></td></tr>
<tr class="separator:a73e49d0ece770a2640cee40cf7642a6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab304f934ce3fda6317fdc21a169ed8d7"><td class="memItemLeft" align="right" valign="top"><a id="ab304f934ce3fda6317fdc21a169ed8d7"></a>
StdLargeVec&lt; <a class="el" href="classsize__t.html">size_t</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>unsorted_id_</b></td></tr>
<tr class="separator:ab304f934ce3fda6317fdc21a169ed8d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade9fa03e07902618072b4e2ecd0869ef"><td class="memItemLeft" align="right" valign="top"><a id="ade9fa03e07902618072b4e2ecd0869ef"></a>
<a class="el" href="namespace_s_p_h.html#a25348a626f1536e232c52f9717945f59">ParticleData</a>&#160;</td><td class="memItemRight" valign="bottom"><b>sortable_data_</b></td></tr>
<tr class="separator:ade9fa03e07902618072b4e2ecd0869ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5b2d5e1c8db1e5876865faa89036130"><td class="memItemLeft" align="right" valign="top"><a id="ac5b2d5e1c8db1e5876865faa89036130"></a>
<a class="el" href="namespace_s_p_h.html#ad964bd16bd649c1ee72aa32164405435">ParticleDataMap</a>&#160;</td><td class="memItemRight" valign="bottom"><b>sortable_variable_maps_</b></td></tr>
<tr class="separator:ac5b2d5e1c8db1e5876865faa89036130"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:af2bf8e6505a26f4d9612135721a4961a"><td class="memItemLeft" align="right" valign="top"><a id="af2bf8e6505a26f4d9612135721a4961a"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>writePltFileHeader</b> (std::ofstream &amp;output_file)</td></tr>
<tr class="separator:af2bf8e6505a26f4d9612135721a4961a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1dafb593251d9dab994e04916e511dd"><td class="memItemLeft" align="right" valign="top"><a id="aa1dafb593251d9dab994e04916e511dd"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>writePltFileParticleData</b> (std::ofstream &amp;output_file, <a class="el" href="classsize__t.html">size_t</a> index_i)</td></tr>
<tr class="separator:aa1dafb593251d9dab994e04916e511dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94811df42700d9696b4f94264163c071"><td class="memTemplParams" colspan="2">template&lt;int DataTypeIndex, typename VariableType &gt; </td></tr>
<tr class="memitem:a94811df42700d9696b4f94264163c071"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#a94811df42700d9696b4f94264163c071">addAVariableNameToList</a> (<a class="el" href="namespace_s_p_h.html#a058f422301dc6671883a7ca3ef568075">ParticleVariableList</a> &amp;variable_name_list, std::string variable_name)</td></tr>
<tr class="separator:a94811df42700d9696b4f94264163c071"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a6c1c4100b6ee5f1691c1f719cdfb4f9c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_s_p_h_1_1_s_p_h_body.html">SPHBody</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_particles.html#a6c1c4100b6ee5f1691c1f719cdfb4f9c">body_</a></td></tr>
<tr class="separator:a6c1c4100b6ee5f1691c1f719cdfb4f9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1da9f412b64791328fb8660754272c37"><td class="memItemLeft" align="right" valign="top"><a id="a1da9f412b64791328fb8660754272c37"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>body_name_</b></td></tr>
<tr class="separator:a1da9f412b64791328fb8660754272c37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af45ad736a13263d4227e443f445123ea"><td class="memItemLeft" align="right" valign="top"><a id="af45ad736a13263d4227e443f445123ea"></a>
<a class="el" href="class_s_p_h_1_1_xml_engine.html">XmlEngine</a>&#160;</td><td class="memItemRight" valign="bottom"><b>restart_xml_engine_</b></td></tr>
<tr class="separator:af45ad736a13263d4227e443f445123ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bd3c18d4b179076a7fbc3f92688e236"><td class="memItemLeft" align="right" valign="top"><a id="a5bd3c18d4b179076a7fbc3f92688e236"></a>
<a class="el" href="class_s_p_h_1_1_xml_engine.html">XmlEngine</a>&#160;</td><td class="memItemRight" valign="bottom"><b>reload_xml_engine_</b></td></tr>
<tr class="separator:a5bd3c18d4b179076a7fbc3f92688e236"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a595aa6b13d6d987e7febf2c43be042a1"><td class="memItemLeft" align="right" valign="top"><a id="a595aa6b13d6d987e7febf2c43be042a1"></a>
<a class="el" href="namespace_s_p_h.html#a058f422301dc6671883a7ca3ef568075">ParticleVariableList</a>&#160;</td><td class="memItemRight" valign="bottom"><b>variables_to_write_</b></td></tr>
<tr class="separator:a595aa6b13d6d987e7febf2c43be042a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a230a6f05b5ece7f81b00ea8f9b3ac6d8"><td class="memItemLeft" align="right" valign="top"><a id="a230a6f05b5ece7f81b00ea8f9b3ac6d8"></a>
<a class="el" href="namespace_s_p_h.html#a058f422301dc6671883a7ca3ef568075">ParticleVariableList</a>&#160;</td><td class="memItemRight" valign="bottom"><b>variables_to_restart_</b></td></tr>
<tr class="separator:a230a6f05b5ece7f81b00ea8f9b3ac6d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Particles with essential (geometric and kinematic) data. There are three types of particles， all particles of a same type are saved with continuous memory segments. The first type is real particles whose states are updated by particle dynamics. One is buffer particles whose state are not updated by particle dynamics. Buffer particles are saved behind real particles. The global value of total_real_particles_ separate the real and buffer particles. They may be switched from real particles or switch to real particles. As the memory for both particles are continuous, such switch is achieved at the memory boundary sequentially. The basic idea is swap the data of the last real particle with the one will be switched particle, and then switch this swapped last particle as buffer particle by decrease the total_real_particles_ by one. Switch from buffer particle to real particle is easy. One just need to assign expect state to the first buffer particle and increase total_real_particles_ by one. The other is ghost particles whose states are updated according to boundary condition if their indices are included in the neighbor particle list. The ghost particles are saved behind the buffer particles. The global value of real_particles_bound_ separate the sum of real and buffer particles with ghost particles. The global value of total_ghost_particles_ indicates the total number of ghost particles in use. It will be initialized to zero before a time step. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a94811df42700d9696b4f94264163c071"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a94811df42700d9696b4f94264163c071">&#9670;&nbsp;</a></span>addAVariableNameToList()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int DataTypeIndex, typename VariableType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SPH::BaseParticles::addAVariableNameToList </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespace_s_p_h.html#a058f422301dc6671883a7ca3ef568075">ParticleVariableList</a> &amp;&#160;</td>
          <td class="paramname"><em>variable_name_list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>variable_name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>add a variable into a particle vairable name list </p>

</div>
</div>
<a id="a0bfbad4c717e63466ba19c25e2f0d921"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0bfbad4c717e63466ba19c25e2f0d921">&#9670;&nbsp;</a></span>addAVariableToWrite()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int DataTypeIndex, typename VariableType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SPH::BaseParticles::addAVariableToWrite </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>variable_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>add a variable into the list for state output </p>

</div>
</div>
<a id="a603b1f4b21d060ef0a036e341578bbe1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a603b1f4b21d060ef0a036e341578bbe1">&#9670;&nbsp;</a></span>createAVariable() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int DataTypeIndex, typename VariableType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">StdLargeVec&lt;<a class="el" href="class_variable_type.html">VariableType</a>&gt;* SPH::BaseParticles::createAVariable </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>new_variable_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>old_variable_name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>create and register a new variable, which has not been defined yet in particles, by copying data from an exist variable </p>

</div>
</div>
<a id="ae9a9d99734c972e6cf1e4d9689545487"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae9a9d99734c972e6cf1e4d9689545487">&#9670;&nbsp;</a></span>createAVariable() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int DataTypeIndex, typename VariableType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">StdLargeVec&lt;<a class="el" href="class_variable_type.html">VariableType</a>&gt;* SPH::BaseParticles::createAVariable </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>new_variable_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_variable_type.html">VariableType</a>&#160;</td>
          <td class="paramname"><em>initial_value</em> = <code><a class="el" href="class_variable_type.html">VariableType</a>(0)</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Create and register a new variable which has not been defined yet in particles. If the variable is registered already, the registered variable will be returned. </p>

</div>
</div>
<a id="affce1d43813839bdc86d091ff8c77e2d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#affce1d43813839bdc86d091ff8c77e2d">&#9670;&nbsp;</a></span>getKernelGradient()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual Vecd SPH::BaseParticles::getKernelGradient </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsize__t.html">size_t</a>&#160;</td>
          <td class="paramname"><em>particle_index_i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classsize__t.html">size_t</a>&#160;</td>
          <td class="paramname"><em>particle_index_j</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Real&#160;</td>
          <td class="paramname"><em>dW_ij</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Vecd &amp;&#160;</td>
          <td class="paramname"><em>e_ij</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get the kernel gradient in weak form. </p>

<p>Reimplemented in <a class="el" href="class_s_p_h_1_1_solid_particles.html#adaf798dbe70fc42d8b6a6eafe4e7cefa">SPH::SolidParticles</a>.</p>

</div>
</div>
<a id="a6dc2dba5a7b84f2e814fba642ea8cba0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6dc2dba5a7b84f2e814fba642ea8cba0">&#9670;&nbsp;</a></span>getVariableByName()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int DataTypeIndex, typename VariableType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">StdLargeVec&lt;<a class="el" href="class_variable_type.html">VariableType</a>&gt;* SPH::BaseParticles::getVariableByName </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>variable_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>get a registered variable from particles by its name </p>

</div>
</div>
<a id="a7a07ff11234c5ec58ff67bbc4251f489"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7a07ff11234c5ec58ff67bbc4251f489">&#9670;&nbsp;</a></span>insertAGhostParticle()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsize__t.html">size_t</a> SPH::BaseParticles::insertAGhostParticle </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsize__t.html">size_t</a>&#160;</td>
          <td class="paramname"><em>index_i</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>For a ghost particle, its sorted id is that of corresponding real particle.</p>
<p>For a ghost particle, its sorted id is that of corresponding real particle.</p>

</div>
</div>
<a id="aacd901a6230deb7dfb2b6e5ca192072c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aacd901a6230deb7dfb2b6e5ca192072c">&#9670;&nbsp;</a></span>normalizeKernelGradient()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual Vecd SPH::BaseParticles::normalizeKernelGradient </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsize__t.html">size_t</a>&#160;</td>
          <td class="paramname"><em>particle_index_i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Vecd &amp;&#160;</td>
          <td class="paramname"><em>kernel_gradient</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Normalize the kernel gradient. </p>

<p>Reimplemented in <a class="el" href="class_s_p_h_1_1_solid_particles.html#ad6dc347577e65c254e4c5490b4bcc189">SPH::SolidParticles</a>.</p>

</div>
</div>
<a id="a2e3222c982fea6397f428581109f3eab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e3222c982fea6397f428581109f3eab">&#9670;&nbsp;</a></span>registerASortableVariable()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int DataTypeIndex, typename VariableType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SPH::BaseParticles::registerASortableVariable </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>variable_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>register an already defined variable as sortable </p>

</div>
</div>
<a id="a7eda51aeb6fc94339f9d28575a0df063"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7eda51aeb6fc94339f9d28575a0df063">&#9670;&nbsp;</a></span>registerAVariable()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int DataTypeIndex, typename VariableType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SPH::BaseParticles::registerAVariable </td>
          <td>(</td>
          <td class="paramtype">StdLargeVec&lt; <a class="el" href="class_variable_type.html">VariableType</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>variable_addrs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>variable_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_variable_type.html">VariableType</a>&#160;</td>
          <td class="paramname"><em>initial_value</em> = <code><a class="el" href="class_variable_type.html">VariableType</a>(0)</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>register a variable defined in a class (can be non-particle class) to base particles </p>

</div>
</div>
<a id="af56c3d9d2de8bcd3811c77689101a352"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af56c3d9d2de8bcd3811c77689101a352">&#9670;&nbsp;</a></span>writeParticlesToPltFile()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SPH::BaseParticles::writeParticlesToPltFile </td>
          <td>(</td>
          <td class="paramtype">std::ofstream &amp;&#160;</td>
          <td class="paramname"><em>output_file</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Write particle data in PLT format for Tecplot. </p>

</div>
</div>
<a id="a2b77e1d04a5955cee741defc108c1b75"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b77e1d04a5955cee741defc108c1b75">&#9670;&nbsp;</a></span>writeParticlesToVtuFile()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SPH::BaseParticles::writeParticlesToVtuFile </td>
          <td>(</td>
          <td class="paramtype">std::ofstream &amp;&#160;</td>
          <td class="paramname"><em>output_file</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Write particle data in VTU format for Paraview. </p>

<p>Reimplemented in <a class="el" href="class_s_p_h_1_1_elastic_solid_particles.html#adf465e0d090733967147060ff469d8f0">SPH::ElasticSolidParticles</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a6b6da33563d4725affb544d20848ea58"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6b6da33563d4725affb544d20848ea58">&#9670;&nbsp;</a></span>base_material_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_s_p_h_1_1_base_material.html">BaseMaterial</a>* SPH::BaseParticles::base_material_</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>for dynamic cast in particle data delegation </p>

</div>
</div>
<a id="a6c1c4100b6ee5f1691c1f719cdfb4f9c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c1c4100b6ee5f1691c1f719cdfb4f9c">&#9670;&nbsp;</a></span>body_</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_s_p_h_1_1_s_p_h_body.html">SPHBody</a>* SPH::BaseParticles::body_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The body in which the particles belongs to. </p>

</div>
</div>
<a id="a009d3448cf7a69fb162ede6afd34f5ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a009d3448cf7a69fb162ede6afd34f5ee">&#9670;&nbsp;</a></span>dvel_dt_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">StdLargeVec&lt;Vecd&gt; SPH::BaseParticles::dvel_dt_</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>inner pressure- or stress-induced acceleration </p>

</div>
</div>
<a id="aa6aa918af115e49d6b98137c00b015e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa6aa918af115e49d6b98137c00b015e7">&#9670;&nbsp;</a></span>dvel_dt_others_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">StdLargeVec&lt;Vecd&gt; SPH::BaseParticles::dvel_dt_others_</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>other, such as gravity and viscous, accelerations </p>

</div>
</div>
<a id="a02c7fc3468dcf92154a1a60c2a170e1a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a02c7fc3468dcf92154a1a60c2a170e1a">&#9670;&nbsp;</a></span>mass_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">StdLargeVec&lt;Real&gt; SPH::BaseParticles::mass_</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>particle mass </p>

</div>
</div>
<a id="ad56cde78e1cf8ca57bae114d88a23c3c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad56cde78e1cf8ca57bae114d88a23c3c">&#9670;&nbsp;</a></span>pos_n_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">StdLargeVec&lt;Vecd&gt; SPH::BaseParticles::pos_n_</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>current position </p>

</div>
</div>
<a id="a0501a7ad45113b5e671704ed6537c0fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0501a7ad45113b5e671704ed6537c0fb">&#9670;&nbsp;</a></span>real_particles_bound_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsize__t.html">size_t</a> SPH::BaseParticles::real_particles_bound_</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Maximum possible number of real particles. Also the start index of ghost particles. </p>

</div>
</div>
<a id="a2e3eca63a9bb993caec5396ce5f48be9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e3eca63a9bb993caec5396ce5f48be9">&#9670;&nbsp;</a></span>rho_0_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Real SPH::BaseParticles::rho_0_</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>reference density </p>

</div>
</div>
<a id="a06420b0b549bd31847cc56cf86830091"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a06420b0b549bd31847cc56cf86830091">&#9670;&nbsp;</a></span>rho_n_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">StdLargeVec&lt;Real&gt; SPH::BaseParticles::rho_n_</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>current particle density </p>

</div>
</div>
<a id="a6e91adfca7218a340b59f6f1089d54d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e91adfca7218a340b59f6f1089d54d4">&#9670;&nbsp;</a></span>sigma_0_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Real SPH::BaseParticles::sigma_0_</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>reference number density. </p>

</div>
</div>
<a id="ab8225845e6682236f4c7b11c162f76f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab8225845e6682236f4c7b11c162f76f3">&#9670;&nbsp;</a></span>signal_speed_max_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Real SPH::BaseParticles::signal_speed_max_</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Maximum signal speed. </p>

</div>
</div>
<a id="ac5c08c3a1026bfd96469e902ebb9e934"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac5c08c3a1026bfd96469e902ebb9e934">&#9670;&nbsp;</a></span>speed_max_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Real SPH::BaseParticles::speed_max_</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Maximum particle speed. </p>

</div>
</div>
<a id="adf142120d4165071c15dc4974f1f8df7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adf142120d4165071c15dc4974f1f8df7">&#9670;&nbsp;</a></span>vel_n_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">StdLargeVec&lt;Vecd&gt; SPH::BaseParticles::vel_n_</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>current particle velocity </p>

</div>
</div>
<a id="aeff9ca6449d936cf70a2ace2fb9d92d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeff9ca6449d936cf70a2ace2fb9d92d2">&#9670;&nbsp;</a></span>Vol_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">StdLargeVec&lt;Real&gt; SPH::BaseParticles::Vol_</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>particle volume </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>SPHINXsys/src/shared/particles/<a class="el" href="base__particles_8h_source.html">base_particles.h</a></li>
<li>SPHINXsys/src/shared/particles/<a class="el" href="base__particles_8cpp.html">base_particles.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
